<?php

	define("WEBWI_ROOT_PATH", "D:/xampp/htdocs/teste6");
    define("WEBWI_PATH", "D:/xampp/htdocs/teste6/webwi_libs");
    define("WEBWI_VAR_PATH", "D:/xampp/htdocs/teste6/webwi_data");
    define("WEBWI_TRUST_PATH", WEBWI_PATH);
   
    $http = 'http://';
   
    if (!empty($_SERVER['HTTPS'])) {
        $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
    }
    
	define('WEBWI_PROT', $http);
	define("WEBWI_URL", "http://localhost/teste6");
	define("WEBWI_CHECK_PATH", 0);
	
	// * Schutz gegen das ausführen externer Aufrufe, sollte Save Mode OFF sein
    if (WEBWI_CHECK_PATH && !@ini_get("safe_mode")) {
        if (function_exists("check_backtrace")) {
            $webwiScriptPath = check_backtrace();
            if (!count($webwiScriptPath)) {
                 die("WEBWI check: this file cannot be requested directly");
            }
            $webwiScriptPath = $webwiScriptPath[0]["file"];
        } else {
            $webwiScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] :  $_SERVER["SCRIPT_FILENAME"];
        }
        if (DIRECTORY_SEPARATOR != "/") {
            // IIS6 doppelt die \ Zeichen
            $webwiScriptPath = str_replace(strpos($webwiScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $webwiScriptPath);
        }
        if (strcasecmp(substr($webwiScriptPath, 0, strlen(WEBWI_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", WEBWI_ROOT_PATH))) {
             exit("WEBWI check: Script is not inside WEBWI_ROOT_PATH and cannot run.");
        }
    }

    // * Datenank Datei
    require WEBWI_VAR_PATH . '/config/secure.php';
	
	// * definiere die Standard Gruppen
	define('WEBWI_GROUP_ADMIN', '1');
    define('WEBWI_GROUP_USERS', '2');
	define('WEBWI_GROUP_MODERATOR', '3');
	define('WEBWI_GROUP_RESELLER', '4');
    define('WEBWI_GROUP_ANONYMOUS', '5');
	define('WEBWI_GROUP_SUB_USER', '6');
	define('WEBWI_GROUP_SUB_RESELLER', '7');
	
	
	 if (!isset($webwiOption["noglobal"]) && WEBWI_ROOT_PATH != "") {
        include WEBWI_ROOT_PATH . '/system/global.php';
    }

?>